using UnityEngine;
using System.Collections;

public class HardBullet : MonoBehaviour
{
    public int moveSpeed = 80;
    public static bool stop;
	public static int score;
	public GameObject FrontPaddle;
	public GameObject MiddlePaddle;
	public GameObject BackPaddle;

    // Use this for initialization
    void Start()
    {
		stop = false;
    }

    // Update is called once per frame
    void Update()
    {
		bulletMove();
	}
		
	void bulletMove()
	{
        Vector3 newPosition = new Vector3(-1, 0, 0) * (moveSpeed * Time.deltaTime);

        if (!stop)
        {
            newPosition = transform.position + newPosition;
            transform.position = newPosition;
        }
        if (newPosition.x < -135)
        {
            stop = true;
            Destroy(transform.gameObject);
        }
        if (stop)
        {
            if (newPosition.x < 125 || newPosition.x > -135)
            {
                Destroy(transform.gameObject);
			}
        }

    }
	
}
